<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>萃萃后台管理系统</title>
    <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.css">
</head>
<body>
<div class="container">
    <div class="page-header text-center">
        <h1>
            萃萃后台管理系统
            <small>添加图书</small>
        </h1>
    </div>
    <div class="row">
        <div class="col-md-6 col-md-offset-3">
            <form action="{% url 'book:book_add' %}" method="post" style="border: #999 1px solid; padding: 20px;">
                {% csrf_token %}
                <div class="form-group">
                    <label for="name">书名</label>
                    <input type="text" class="form-control" id="name" name="name">
                </div>
                <div class="form-group">
                    <label for="intro">简介</label>
                    <textarea type="text" class="form-control" id="intro" name="intro"></textarea>
                </div>
                <div class="form-group">
                    <label for="price">价格</label>
                    <input type="text" class="form-control" id="price" name="price">
                </div>
                <div class="form-group">
                    <label for="pub_date">出版时间</label>
                    <input type="date" class="form-control" id="pub_date" name="pub_date">
                </div>
                <div class="form-group">
                    <label for="author">作者</label>
                    <select name="author" id="author" class="form-control">
                        {% for author in authors %}
                            <option value="{{ author.id }}">{{ author.name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <div class="form-group">
                    <label for="publisher">出版社</label>
                    <select name="publisher" id="publisher" class="form-control">
                        {% for publisher in publishers %}
                            <option value="{{ publisher.id }}">{{ publisher.name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <button type="submit" class="btn btn-default">提交</button>
            </form>
        </div>
    </div>
</div>
</body>
</html>